//
// Decompiled by Jadx - 341ms
//
package gc;

import android.app.Activity;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.drawable.Drawable;
import android.widget.TextView;
import as.a;
import cc.f;
import de.robv.android.xposed.XposedHelpers;
import fi.y;
import fn.j;
import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;

public class ci$a implements InvocationHandler {
    public final f a;
    public final Object b;
    public final Activity c;
    public final Object d;
    public final ci e;

    public ci$a(ci ciVar, f fVar, Object obj, Activity activity, Object obj2) {
        this.e = ciVar;
        this.a = fVar;
        this.b = obj;
        this.c = activity;
        this.d = obj2;
    }

    @Override
    public final Object invoke(Object obj, Method method, Object[] objArr) {
        Object obj2;
        Bitmap createBitmap;
        y.d();
        if (method.getName().equals("onGetReverseGeoCodeResult") && (obj2 = objArr[0]) != null) {
            ci ciVar = this.e;
            Object objectField = XposedHelpers.getObjectField(obj2, ciVar.b.getFieldName());
            ciVar.c = ci.d(ciVar, j.as(objectField, "countryName")) + ci.d(ciVar, j.as(objectField, "province")) + ci.d(ciVar, j.as(objectField, "city")) + ci.d(ciVar, j.as(objectField, "distric")) + ci.d(ciVar, j.as(objectField, "town"));
            ((TextView) this.a.c).setText(ciVar.c);
            Object[] objArr2 = {j.ad(j.ak("com.baidu.mapapi.map.MapStatusUpdateFactory"), "newLatLng", new Object[]{ciVar.a})};
            Object obj3 = this.b;
            j.ab(obj3, "animateMapStatus", objArr2);
            Class ak = j.ak("com.baidu.mapapi.map.BitmapDescriptorFactory");
            Object[] objArr3 = new Object[1];
            Object obj4 = a.b;
            Drawable b = a.c.b(this.c, -2113404835);
            if (b == null) {
                createBitmap = null;
            } else {
                createBitmap = Bitmap.createBitmap(b.getIntrinsicWidth(), b.getIntrinsicHeight(), Bitmap.Config.ARGB_8888);
                Canvas canvas = new Canvas(createBitmap);
                b.setBounds(0, 0, canvas.getWidth(), canvas.getHeight());
                b.draw(canvas);
            }
            objArr3[0] = createBitmap;
            j.ab(obj3, "addOverlay", new Object[]{j.ab(j.ab(j.bl("com.baidu.mapapi.map.MarkerOptions", new Object[0]), "position", new Object[]{ciVar.a}), "icon", new Object[]{j.ad(ak, "fromBitmap", objArr3)})});
            j.ab(obj3, "setMapStatus", new Object[]{j.ad(j.ak("com.baidu.mapapi.map.MapStatusUpdateFactory"), "zoomTo", new Object[]{15})});
        }
        j.aa(this.d, "destroy");
        return null;
    }
}
